﻿<a href="@Website" target="@Target">
    <MudPaper Elevation="@(LandingPage? 0 : 25)" Class="@GetClassnames()" Height="100%">
        <img alt="@Name" src="@($"_content/MudBlazor.Docs/images/sponsors/{Image}")">
    </MudPaper>
</a>

@code {
    [Parameter] public string Website { get; set; }
    [Parameter] public string Name { get; set; }
    [Parameter] public string Image { get; set; }
    [Parameter] public bool LandingPage { get; set; }

    [Parameter] public string Target { get; set; } = "_blank";
    
    private string GetClassnames()
    {
        if (LandingPage)
        {
            return "lp-sponsor d-flex justify-center align-center mud-transparent pa-4 relative";
        }
        else
        {
            return "d-flex justify-center align-center mud-transparent rounded-lg relative";
        }
    }
}